algorithm for some of the digits

visit shbcf.ru